package com.bc.db;

import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.util.Log;

public class BaseDao {
	
	protected Context mContext;
	
	public BaseDao(Context context){
		mContext=context;
	}
	
	public static void close(Cursor cursor,SQLiteDatabase db){
		if(cursor!=null){
			cursor.close();
		}
		DBHelper.ref--;
		if(DBHelper.ref<=0){
			Log.d("BaseDao", "引用数为："+DBHelper.ref);
			db.close();
		}
		
	}
}
